package com.ityj.yygh.oss.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConstantPropertiesUtils implements InitializingBean {

    @Value("${oos.endpoint}")
    private String endpoint;
    @Value("${oos.accessKeyId}")
    private String accessKeyId;
    @Value("${oos.accessKeySecret}")
    private String accessKeySecret;
    @Value("${oos.bucket}")
    private String bucket;

    public static String END_POINT;
    public static String ACCESS_KEY_ID;
    public static String ACCESS_KEY_SECRET;
    public static String BUCKET;

    @Override
    public void afterPropertiesSet() throws Exception {
        END_POINT = this.endpoint;
        ACCESS_KEY_ID = this.accessKeyId;
        ACCESS_KEY_SECRET = this.accessKeySecret;
        BUCKET = this.bucket;
    }
}
